package com.wang.util;


import com.wang.DataonlineTcpSocketApplication;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Date;

public class PrintUtil {


    public static final String ANSI_RESET = "\u001B[0m";
    public static final String ANSI_BLACK = "\u001B[30m";
    public static final String ANSI_RED = "\u001B[31m";
    public static final String ANSI_GREEN = "\u001B[32m";
    public static final String ANSI_YELLOW = "\u001B[33m";
    public static final String ANSI_BLUE = "\u001B[34m";
    public static final String ANSI_PURPLE = "\u001B[35m";
    public static final String ANSI_CYAN = "\u001B[36m";
    public static final String ANSI_WHITE = "\u001B[37m";

    private static Logger logger = LoggerFactory.getLogger(PrintUtil.class);

    public static  void print(String context){

        //System.out.println("^_^:"+ DateUtil.dateToString(new Date(),"yyyy-MM-dd HH:mm:ss:ms")+" ==> : "+ANSI_YELLOW+context);
        logger.info(context);
    }
    public static  void print(Integer context){

        //System.out.println("^_^:"+ DateUtil.dateToString(new Date(),"yyyy-MM-dd HH:mm:ss:ms")+" ==> : "+ANSI_YELLOW+context);
        logger.info(context.toString());
    }
    public static  void print(Object context){

        //System.out.println("^_^:"+ DateUtil.dateToString(new Date(),"yyyy-MM-dd HH:mm:ss:ms")+" ==> : "+ANSI_YELLOW+context);
        logger.info(context.toString());
    }
}
